move Qt floor from 5.12 to 5.15 (#1199)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Sat, 28 Oct 2023 11:41:58 +0000 (05:41 -0600)
committerGitHub <noreply@github.com>
Sat, 28 Oct 2023 11:41:58 +0000 (05:41 -0600)
* move Qt floor to 5.15.

* fix focal, coverage, windows 32 bit builds.

* try harder to fix coverage build

* fix codeql build

* kill fedora 32 CI build which uses Qt 5.14.

17 files changed:
.github/workflows/codeql-analysis.yml
.github/workflows/fedora.yml
.github/workflows/ubuntu.yml
.github/workflows/windows.yml
CMakeLists.txt
gui/CMakeLists.txt
igc.cc
main.cc
shape.cc
src/core/logging.h
tools/ci_install_windows.sh
tools/ci_setup_windows.ps1
tools/make_docker_qtio_image
tools/travis_install_linux_coverage
tools/travis_install_linux_local
util.cc
xcsv.cc

index 98482780a2662a72cb7dd49b4e3506ef0f4fb05c..27efd0025dfce41b59b9463f9735595bbcbfe006 100644 (file)
@@ -27,7 +27,7 @@ jobs:
     name: Analyze
     runs-on: ubuntu-latest
     container:
-      image: gpsbabel-docker.jfrog.io/tsteven4/gpsbabel_build_environment_focal
+      image: gpsbabel-docker.jfrog.io/tsteven4/gpsbabel_build_environment_jammy
       env:
         CMAKE_GENERATOR: Ninja
 
index 6c738852870aa38c41647fb395741732afb53171..76543d9d53f5470250c34231a77787d67e053870 100644 (file)
@@ -13,10 +13,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        # version 32, though obsolete, uses Qt 5.14 so we keep it for that.
         include:
-          - IMAGE: '32'
-            CMAKE_PREFIX_PATH: '/usr/lib64/cmake/Qt5'
           - IMAGE: '35'
             CMAKE_PREFIX_PATH: '/usr/lib64/cmake/Qt5'
           - IMAGE: '37'
index 2cf8d43319fa863850e67fbc585ce285e7cf5a48..9a1f928021e9432bc5ac20cf0d868cc3aec832aa 100644 (file)
@@ -18,8 +18,9 @@ jobs:
       fail-fast: false
       matrix:
         include:
-          - IMAGE: 'focal'
-            SCRIPT: './tools/build_and_test_cmake.sh'
+          # focal has Qt 5.12, end of standard support 4/2025, end of life 4/2030.
+          #- IMAGE: 'focal'
+          #  SCRIPT: './tools/build_and_test_cmake.sh'
           - IMAGE: 'jammy'
             CMAKE_PREFIX_PATH: '/usr/lib/x86_64-linux-gnu/cmake/Qt5'
             SCRIPT: './tools/build_and_test_cmake.sh'
@@ -63,12 +64,12 @@ jobs:
 
   coverage:
     name: coverage Build
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-latest
     steps:
     - name: install
       run: |
         sudo apt-get update
-        sudo apt-get install gcovr lcov libusb-1.0-0-dev qt5-default  qtwebengine5-dev libqt5serialport5-dev ninja-build
+        sudo apt-get install gcovr lcov libusb-1.0-0-dev qtbase5-dev qtwebengine5-dev libqt5serialport5-dev ninja-build
 
     - name: Checkout repository
       uses: actions/checkout@v4
index 4a5a69411ab2b6ae71002743b015bc83ddcc060f..fa003068dcff07bb9698bf90758b581ec22d44eb 100644 (file)
@@ -19,27 +19,27 @@ jobs:
       fail-fast: false
       matrix:
         include:
-          - QT_VERSION: '5.12.12'
+          - QT_VERSION: '5.15.2'
             ARCH: 'amd64'
             HOST_ARCH: 'amd64'
-            COMPILER: 'msvc2017_64'
+            COMPILER: 'msvc2019_64'
             METHOD: 'aqt'
             GENERATOR: 'Visual Studio 16 2019'
             RELEASE: false
             os: windows-2019
-          - QT_VERSION: '5.12.12'
+          - QT_VERSION: '5.15.2'
             ARCH: 'amd64'
             HOST_ARCH: 'amd64'
-            COMPILER: 'msvc2017_64'
+            COMPILER: 'msvc2019_64'
             TOOLSET: 'v141,version=14.16.27023'
             METHOD: 'aqt'
             GENERATOR: 'Visual Studio 16 2019'
             RELEASE: false
             os: windows-2019
-          - QT_VERSION: '5.12.12'
+          - QT_VERSION: '5.15.2'
             ARCH: 'x86'
             HOST_ARCH: 'amd64'
-            COMPILER: 'msvc2017'
+            COMPILER: 'msvc2019'
             METHOD: 'aqt'
             GENERATOR: 'Visual Studio 16 2019'
             RELEASE: false
index eb8badaaa58f0d9414d192ed9ef36b53e1b15ad3..315137eefba390b7c462e00ad1503939879f38b7 100644 (file)
@@ -29,8 +29,8 @@ add_executable(gpsbabel)
 find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
 find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
 list(APPEND QT_LIBRARIES Qt${QT_VERSION_MAJOR}::Core)
-if(${Qt${QT_VERSION_MAJOR}Core_VERSION} VERSION_LESS 5.12)
-  message(FATAL_ERROR "Qt version ${Qt${QT_VERSION_MAJOR}Core_VERSION} found, but version 5.12 or newer is required.")
+if(${Qt${QT_VERSION_MAJOR}Core_VERSION} VERSION_LESS 5.15)
+  message(FATAL_ERROR "Qt version ${Qt${QT_VERSION_MAJOR}Core_VERSION} found, but version 5.15 or newer is required.")
 else()
   message(STATUS "Using Qt${QT_VERSION_MAJOR} version ${Qt${QT_VERSION_MAJOR}Core_VERSION}")
 endif()
index 97062e8a9e370c440f8467efd536ce322a26c313..a64f6813a14fc2cbf031b66c4aedab5b3d7349d9 100644 (file)
@@ -25,8 +25,8 @@ endif()
 find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
 find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Network SerialPort Widgets Xml REQUIRED)
 list(APPEND QT_LIBRARIES Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::SerialPort Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Xml)
-if(${Qt${QT_VERSION_MAJOR}Core_VERSION} VERSION_LESS 5.12)
-  message(FATAL_ERROR "Qt version ${Qt${QT_VERSION_MAJOR}Core_VERSION} found, but version 5.12 or newer is required.")
+if(${Qt${QT_VERSION_MAJOR}Core_VERSION} VERSION_LESS 5.15)
+  message(FATAL_ERROR "Qt version ${Qt${QT_VERSION_MAJOR}Core_VERSION} found, but version 5.15 or newer is required.")
 else()
   message(STATUS "Using Qt${QT_VERSION_MAJOR} version ${Qt${QT_VERSION_MAJOR}Core_VERSION}")
 endif()
diff --git a/igc.cc b/igc.cc
index 11b2cfb6fe9a35f6092f7e6faf6e638aeccdee04..35fd32f6786c17af0ebde1487a06fe4d647f9f98 100644 (file)
--- a/igc.cc
+++ b/igc.cc
@@ -688,11 +688,7 @@ void IgcFormat::wr_header()
   // Other header data may have been stored in track description
   if (track && track->rte_desc.startsWith(HDRMAGIC)) {
     QString desc = track->rte_desc.mid(QString(HDRMAGIC).size());
-#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
-    const QStringList fields = desc.split(HDRDELIM, QString::SkipEmptyParts);
-#else
     const QStringList fields = desc.split(HDRDELIM, Qt::SkipEmptyParts);
-#endif
     for (const auto& field : fields) {
       gbfprintf(file_out, "%s\r\n", CSTR(field));
     }
diff --git a/main.cc b/main.cc
index f99f47903626f8f1fde7aeb7af3f67fcef151c7b..21cafdee1b5b68a8df6fde9fc1127a098af0d1d1 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -738,7 +738,7 @@ main(int argc, char* argv[])
 // MIN_QT_VERSION in GPSBabel.pro should correspond to the QT_VERSION_CHECK
 // arguments in main.cc and gui/main.cc and the version check in
 // CMakeLists.txt, gui/CMakeLists.txt.
-#if (QT_VERSION < QT_VERSION_CHECK(5, 12, 0))
+#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
 #error This version of Qt is not supported.
 #endif
 
index 318c1a193faf963f9f818833ea8e3365bb38cbc0..42cbe1e57133ce2fe26bdd4264a10d07d94bf20e 100644 (file)
--- a/shape.cc
+++ b/shape.cc
@@ -218,11 +218,7 @@ ShapeFormat::read()
     if (qopt_name.contains('+')) {
       // form a compound name from one or more fields.
       nameidx = -2;
-#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
-      const QStringList opt_name_fields = qopt_name.split('+', QString::SkipEmptyParts);
-#else
       const QStringList opt_name_fields = qopt_name.split('+', Qt::SkipEmptyParts);
-#endif
       nameindices.reserve(opt_name_fields.size());
       for (int oidx=0; oidx<opt_name_fields.size(); oidx++) {
         bool ok;
index c3932d99247b1295dff88151f6989ceb9560473b..a417337529facbcae278f3556ce2bfc7fcd81e9b 100644 (file)
@@ -66,17 +66,4 @@ public:
   explicit Debug(int l) : QDebug(QtDebugMsg) {nospace().noquote() << DebugIndent(l);}
 };
 
-/*
- * Kludge any used QTextStream modifiers into Qt namespace as they are in newer
- * versions of Qt.  This makes source compatiblity easier.
- */
-#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
-namespace Qt
-{
-  inline QTextStream& dec(QTextStream &s) { return ::dec(s); }
-  inline QTextStream& hex(QTextStream &s) { return ::hex(s); }
-  inline QTextStream& endl(QTextStream &s) { return ::endl(s); }
-  inline QTextStream& uppercasedigits(QTextStream &s) { return ::uppercasedigits(s); }
-}
-#endif
 #endif //  SRC_CORE_LOGGING_H_
index a14c99185dd3784381afa0183e208132549dc87c..9c4e379d16818cb728dc53aed297ca61d3dc1de2 100755 (executable)
@@ -18,8 +18,8 @@ function validate() {
   )
 }
 
-QT_VERSION=${1:-5.12.10}
-COMPILER=${2:-msvc2017_64}
+QT_VERSION=${1:-5.15.2}
+COMPILER=${2:-msvc2019_64}
 METHOD=${3:-default}
 
 if [ "${COMPILER}" = "msvc2017_64" ]; then
@@ -28,6 +28,8 @@ elif [ "${COMPILER}" = "msvc2017" ]; then
   PACKAGE_SUFFIX=win32_msvc2017
 elif [ "${COMPILER}" = "msvc2019_64" ]; then
   PACKAGE_SUFFIX=win64_msvc2019_64
+elif [ "${COMPILER}" = "msvc2019" ]; then
+  PACKAGE_SUFFIX=win32_msvc2019
 else
   echo "ERROR: unrecognized Qt compiler ${COMPILER}." >&2
   exit 1
index 582a84c087f3e53f62de580524dd5e11932f19a1..73791c7472b1defdf58deb525b1f6bdffcf5ad91 100755 (executable)
@@ -7,7 +7,7 @@
 # and https://github.com/microsoft/vswhere/wiki/Start-Developer-Command-Prompt\r
 \r
 Param(\r
-    [string] $qtdir = "C:\Qt\Qt5.12.10\5.12.10\msvc2017_64",\r
+    [string] $qtdir = "C:\Qt\Qt5.15.2\5.15.2\msvc2019_64",\r
     [ValidateSet("x86", "amd64")][string] $arch = "amd64",\r
     [ValidateSet("x86", "amd64")][string] $host_arch = "amd64",\r
     [string] $vcversion\r
index f8786e3a3356fa7a5b3fa03681f45d18ea899af5..fb1f73cb4c0213471846b2990f17af6017e1acf8 100755 (executable)
@@ -5,7 +5,7 @@
 versuffix=_qtio
 tag=$(date -u +%Y%m%dT%H%M%SZ)
 
-QT_VERSION=5.12.10
+QT_VERSION=5.15.2
 QT_VERSION_SHORT=${QT_VERSION//./}
 QT_CI_PACKAGES="qt.qt5.${QT_VERSION_SHORT}.gcc_64,qt.qt5.${QT_VERSION_SHORT}.qtwebengine"
 DOWNLOAD_URL=$(./qtci/find_qt_installer ${QT_VERSION})
index 2620ad4948d81bbcf38e7209d4183b8e027dfed2..f8ad932e1259f55f6fa374f39109484992942f2d 100755 (executable)
@@ -27,7 +27,7 @@ function validate() {
   )
 }
 
-QT_VERSION=${1:-5.12.2}
+QT_VERSION=${1:-5.15.2}
 QT_VERSION_SHORT=${QT_VERSION//./}
 
 # our expectation is that install-qt creates $QTDIR, $QTDIR/bin.
index 9544a472ac85db9d5884f62fb0af3d7f34e5c010..8d15672a00d600ab5b5851d7a81fc9d8924c8ca2 100755 (executable)
@@ -27,7 +27,7 @@ function validate() {
   )
 }
 
-QT_VERSION=${1:-5.12.2}
+QT_VERSION=${1:-5.15.2}
 QT_VERSION_SHORT=${QT_VERSION//./}
 
 # our expectation is that install-qt creates $QTDIR, $QTDIR/bin.
diff --git a/util.cc b/util.cc
index 38b464f3e2433b2493cc79e0483b2de724062325..e1723f533ee3d133ba6dd0e316bc2e70d96ca2b3 100644 (file)
--- a/util.cc
+++ b/util.cc
@@ -345,11 +345,7 @@ make_datetime(QDate date, QTime time, bool is_localtime, bool force_utc, int utc
     result = QDateTime(QDate(1970, 1, 1), time, timespec, offset);
   } else if (date.isValid()) {
     //  no time, use start of day in the given Qt::TimeSpec.
-#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
-    result = QDateTime(date, QTime(0,0), timespec, offset);
-#else
     result = date.startOfDay(timespec, offset);
-#endif
   }
 
   return result;
diff --git a/xcsv.cc b/xcsv.cc
index 2794c0f7d65ca6594675c59cf1dc5570154e2430..d2c57e549f097224b8cbf199dc3f6865999fe2ea 100644 (file)
--- a/xcsv.cc
+++ b/xcsv.cc
@@ -646,11 +646,7 @@ XcsvFormat::xcsv_parse_val(const QString& value, Waypoint* wpt, const XcsvStyle:
   case XcsvStyle::XT_GEOCACHE_LAST_FOUND: {
     QDate date;
     date = yyyymmdd_to_time(value);
-#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
-    wpt->AllocGCData()->last_found = QDateTime(date);
-#else
     wpt->AllocGCData()->last_found = date.startOfDay();
-#endif
     break;
   }